package com.ss.android.article.base.feature.main;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.widget.TextView;

import com.ss.android.article.base.feature.subscribe.activity.e;
import com.ss.android.common.ui.view.SwipeOverlayFrameLayout;
import com.ss.android.newmedia.activity.BaseActivity;

public class SubscriptionActivity extends BaseActivity {
    public SubscriptionActivity() {

    }

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setContentView(com.ss.android.article.browser.R.layout.a8);
        if(this.getSupportFragmentManager() != null) {
            FragmentTransaction fragmentTransaction = this.getSupportFragmentManager().beginTransaction();
            if(savedInstanceState != null) {
                Fragment v1 = this.getSupportFragmentManager().findFragmentByTag("tag_subscribe_fragment");
                if(v1 != null) {
                    fragmentTransaction.remove(v1);
                }
            }

            fragmentTransaction.add(com.ss.android.article.browser.R.id.root, new e(), "tag_subscribe_fragment").commit();
        }

        this.findViewById(com.ss.android.article.browser.R.id.back).setOnClickListener(new h(this));
        ((TextView)this.findViewById(com.ss.android.article.browser.R.id.title)).setText(com.ss.android.article.browser.R.string.title_add_subscribe_page);
        ((SwipeOverlayFrameLayout)this.findViewById(com.ss.android.article.browser.R.id.swipe_overlay_activity)).setOnSwipeListener(new com.ss.android.article.base.feature.main.i(this));
    }
}

